Modeling significant locations

ABSTRACT

Techniques for modeling significant locations are described. A significant location can be a location that is significant to a user of a mobile device for a variety of reasons. The mobile device can determine that a place or region is a significant location upon determining that, with sufficient certainty, the mobile device has stayed at the place or region for a sufficient amount of time. The mobile device can construct a state model that is an abstraction of one or more significant locations. The state model can include states representing the significant locations, and transitions representing movement of the mobile device between the locations. The mobile device can use the state model to provide predictive user assistance.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a non-provisional of and claims priority to U.S.Provisional Patent Application No. 61/832,741, filed on Jun. 7, 2013,the entire contents of which are hereby incorporated by reference.

TECHNICAL FIELD

This disclosure relates generally to location-based services.

BACKGROUND

Many electronic devices have location-based functions. For example, amobile device can estimate a location of the mobile device using asatellite navigation system (e.g., global positioning system or GPS) ora cellular communications system. The mobile device can perform varioustasks that are location specific. For example, a map applicationexecuting on the mobile device can cause the mobile device to display amap. A marker on the map can indicate a current location of the mobiledevice. Upon receiving a user input selecting the marker, the mobiledevice can display points of interests, e.g., restaurants or gasstations, that are close to the current location. Upon receiving a userinput specifying a destination, the mobile device can display a routefrom the current location to the destination, and an estimated time ofarrival based on traffic information on the route.

SUMMARY

Techniques for modeling significant locations are described. Asignificant location can be a location that is significant to a user ofa mobile device for a variety of reasons. The mobile device candetermine that a place or region is a significant location upondetermining that, with sufficient certainty, the mobile device hasstayed at the place or region for a sufficient amount of time. Themobile device can construct a state model that is an abstraction of oneor more significant locations. The state model can include statesrepresenting the significant locations, and transitions representingmovement of the mobile device between the locations. The mobile devicecan use the state model to provide predictive user assistance.

The features described in this specification can be implemented toachieve one or more advantages. A mobile device can learn a movementpattern of the mobile device, and adapt itself to that movement pattern.Using the techniques described in this specification, a mobile devicecan implement predictive user assistance. The mobile device implementingpredictive user assistance can provide the assistance based on themovement pattern without requiring additional user input. Accordingly, auser of the mobile device may have a better experience using services,especially location-based services, of the mobile device. For example,the mobile device can determine that a user usually goes from home towork at 8:00 am on weekdays and from home to a gymnasium at 8:00 am onweekends. Upon being turned on shortly before 8:00 am, on weekdays, themobile device can automatically display traffic information on a routefrom home to work; whereas on weekends, the mobile device canautomatically display traffic information on a route from home to thegymnasium.

The details of one or more implementations of modeling significantlocations are set forth in the accompanying drawings and the descriptionbelow. Other features, aspects, and advantages of modeling significantlocations will become apparent from the description, the drawings, andthe claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating an exemplary implementation ofpredictive user assistance.

FIG. 2 is a diagram illustrating exemplary techniques of determininglocation clusters.

FIG. 3 is a diagram illustrating exemplary techniques of identifyingsignificant locations based on location clusters.

FIG. 4 is a diagram illustrating an exemplary state model determinedbased on the location clusters.

FIG. 5 is a diagram illustrating incremental changes to the state model.

FIG. 6A is a diagram illustrating determining a transition probabilitydensity between exemplary states.

FIG. 6B is diagram illustrating determining an entry probability densityof an exemplary state.

FIGS. 7A, 7B, and 7C are block diagrams illustrating components of anexemplary mobile device implementing predictive user assistance.

FIG. 8 is a flowchart illustrating an exemplary procedure of generatinga state model.

FIG. 9 is a flowchart illustrating an exemplary procedure of predictinga future location.

FIG. 10 is a block diagram illustrating an exemplary device architectureof a mobile device implementing the features and operations of FIGS.1-9.

FIG. 11 is a block diagram of an exemplary network operating environmentfor the mobile devices implementing the features and operations of FIGS.1-9.

Like reference symbols in the various drawings indicate like elements.

DETAILED DESCRIPTION Exemplary Predictive User Assistance

FIG. 1 is a diagram illustrating an exemplary implementation ofpredictive user assistance. Exemplary mobile device 102 can utilize pastmovements of mobile device 102 to predict a future location of mobiledevice 102. Mobile device 102 can then adapt behavior of mobile device102 to perform services that are specific to the predicted futurelocation.

Mobile device 102 can use machine learning and data mining techniques tolearn the past movement of mobile device 102. The past movement can berecorded as significant locations visited by mobile device 102 andmovement of mobile device 102 between the significant locations. Mobiledevice 102 can determine that a place or region is a significantlocation upon determining that, with sufficient certainty, mobile device102 has stayed at the place or region for a sufficient amount of time.The amount of time can be sufficient if it satisfies various criteria,for example, when the amount of time satisfies a time length threshold(e.g., X hours) or a frequency threshold (e.g., X minutes per day, Ynumber of days per week). Records of movement of mobile device 102 caninclude a measured or calculated time of entry into each significantlocation and a measured or calculated time of exit from each significantlocation. A significant location can be associated with multiple entriesand exits.

In addition to significant locations, the records of movement caninclude transitions between the significant locations. Each transitionfrom a first significant location to a second significant location canbe associated with a transition begin timestamp indicating a time mobiledevice 102 leaves the first significant location and a transition endtimestamp indicating a time mobile device 102 enters the secondsignificant location.

Mobile device 102 can represent the records of movement as state model104. State model 104 can include states (e.g., state 106 and otherstates) each representing a significant location, and transitions (e.g.,transition 107 and other transition between the states) eachrepresenting a movement of mobile device 102 between significantlocations. Additional details of determining state model 104 aredescribed below in reference to FIG. 2-5.

Based on state model 104, mobile device 102 can determine (1) atransition probability density that, at a given time, mobile device 102moves from a given significant location to each other significantlocation, or (2) an entry probability density that mobile device 102enters a significant location from a previously unknown or unrepresentedlocation. A pattern analyzer of mobile device 102 can determine a daily,weekly, monthly, or annual movement pattern of mobile device 102 usingstate model 104. A predictive engine of mobile device 102 can usetransition probability density (or entry probability density) and themovement pattern to forecast a significant location that mobile device102 will enter (or stay) at a future time. Mobile device 102 can thenuse the forecast to provide predictive user assistance, e.g., to assistthe user to plan for a future event.

In the example of FIG. 1, mobile device 102 can determine currentlocation 108 using a location determination subsystem of mobile device102. Mobile device 102 can determine current time 110. Based on thecurrent location, current time, and the probabilities and patterns ofstate model 104, mobile device 102 can determine that a most likelylocation of mobile device 102 at a given time in the future is asignificant location represented by state 106. Mobile device 102 canthen perform a user-assistance function corresponding to the significantlocation, or corresponding to a transition from the current location tothe significant location. For example, upon being turned on or unlocked,mobile device 102 can provide for display alert 112 on a display surfaceof mobile device 102. Alert 112 can include user assistance information116. User assistance information 116 can include, for example, a routefrom the current location to the likely future location, and trafficinformation along the route. Mobile device 102 can provide for displayalert 112 and user assistance information 116 automatically, withoutrequesting a user to input the likely future location as a destination.

In some implementations, mobile device 102 can provide a labelassociated with the likely future location. The label can be an addressor a name of a point of interest pre-specified by a user or determinedby mobile device 102 through reverse geocoding or through semanticanalysis of movements of mobile device 102. For example, mobile device102 can determine that a first location is likely to be a home and asecond location is likely to be a work place. Accordingly, mobile device102 can use the terms “home” and “work” in user assistance information116.

Exemplary Techniques of Constructing a State Model

FIG. 2 is a diagram illustrating exemplary techniques of determininglocation clusters. Exemplary mobile device 102 (of FIG. 1) can use thelearning techniques to determine state model 104 (of FIG. 1).

Mobile device 102 can sequentially trace location data through time (T).Sequentially tracing location data can be performed by piggybacking onanother application to avoid or reduce cost of location data collection.For example, mobile device 102 can collect the location data whenanother service requests location from a location determinationsubsystem of mobile device 102. Accordingly, collecting the locationdata can be “free” without having to activate the location determinationsubsystem solely for determining a movement pattern of mobile device102.

Mobile device 102 can collect locations 202, 204, 206, 208, 210, and 212over time T. Collecting the locations can be on-going operations.Locations older than a specified period can be purged. The period can bespecified by user preference or privacy policies. Locations 202, 204,206, 208, 210, and 212 can each include latitude, longitude, andaltitude coordinates and being associated with a timestamp indicating atime the corresponding location is collected.

Mobile device 102 can determine that some of locations 202, 204, 206,208, 210, and 212 belong to location clusters that may indicate asignificant location. Mobile device 102 can determine that a locationcluster is formed upon determining that (1) at least a pre-specifiedthreshold number (e.g., two) of consecutive locations are collected; (2)a time span of the consecutive locations satisfies a pre-specifiedthreshold time window; and (3) these locations are identical, indicatingthat mobile device 102 is stationary, or sufficiently close to oneanother, indicating that mobile device 102 is located in a sufficientlysmall and defined area during the time the locations are collected.

For example, mobile device 102 can determine two location clusters,location cluster 218 and location cluster 220, over time T. Locationcluster 218 can include locations 202, 204, and 206, which are collectedover a time period [T1, T2] that is longer than a threshold time window(e.g., a time window of 45 minutes). Mobile device 102 can determinethat location cluster 218 includes locations 202, 204, and 206 upondetermining that a variance of locations 202, 204, and 206 is low enoughto satisfy a variance threshold. Likewise, location cluster 220 caninclude locations 210 and 212, which are collected within time period[T3, T4]. Mobile device 102 can determine that location cluster 220includes locations 210 and 212 upon determining that a variance oflocations 210 and 212 satisfies the variance threshold.

An outlier detection mechanism can filter out locations that do notbelong to clusters. For example, mobile device 102 can determine thatlocation 208 is different from location 206 and location 210 (e.g., thedistance between location 206 and 208 and the distance between location208 and location 210 exceeds a threshold). In addition, mobile device102 can determine that no other locations are (1) collected within thethreshold time window before or after location 208 and (2)geographically close to location 208. In response, mobile device 102 candetermine that location 208 is an outlier and discard location 208. Inaddition, if a location in a time period is significantly different frommany other locations in the time period, mobile device 102 can discardthe different location as an outlier and determine the location clusterusing other locations in the time window. Mobile device 102 can uselocation clusters 218 and 220 to determine significant locations andstates of state model 104.

FIG. 3 is a diagram illustrating exemplary techniques of identifyingsignificant locations based on location clusters. Using the techniquesdescribed above in reference to FIG. 2, mobile device 102 can identifylocation clusters 218, 220, 302, and 303. Mobile device 102 candetermine significant locations 304, 306, and 308 based on locationclusters 218, 220, 302, and 303.

Mobile device 102 can determine each of significant locations 304, 306,and 308 based on location clusters 218, 220, 302, and 303 using thelocations in each of location clusters 218, 220, 302, and 303.Determining significant locations 304, 306, and 308 can be based onrecursive filter with a constant gain. Details of determiningsignificant locations 304, 306, and 308 are provided below in the nextparagraph. Each of significant locations 304, 306, and 308 can includelatitude, longitude, and optionally, altitude coordinates. Each ofsignificant locations 304, 306, and 308 can be associated with one ormore location clusters. For example, signification location 304 cancorrespond to location cluster 218 in time period [T1, T2] and locationcluster 303 during time period [T7, T8]. Location in location cluster218 and location cluster 303 can be identical. The length of time period[T1, T2] and time window [T7, T8] can be same or different.

Mobile device 102 can have an initial state model at time T2. At timeT2+k, mobile device 102 can receive incremental location data, where kis a difference between time T2 and the time the additional locationdata are received (in this example, k=T7−T2). Mobile device 102 can usethe incremental location data to determine significant location 304 foruse in the state model. Mobile device 102 can determine that locationcluster 218 corresponds to latitude and longitude coordinates X1. Mobiledevice 102 can determine that location cluster 303 corresponds tolatitude and longitude coordinates X2. Mobile device 102 can determinethat a distance between X1 and X2 satisfies a threshold. In response,mobile device 102 can determine that location cluster 218 and locationcluster 303 belong to a same location (significant location 304). Mobiledevice 102 can then add location cluster 303 to significant location 304using constant gain filter as shown below in filter 1. (e.g., a functionof sampling data, e.g., 5, 6, 7, may not be same for all clusters)

$\begin{matrix}{\frac{{X\; 2} + {\alpha\; X\; 1}}{1 + \alpha},{{{where}\mspace{14mu}\alpha} \geq 1}} & (1)\end{matrix}$

The value α in filter 1 (e.g., 5, 6, 7) can be a function of samplingdata and may be same for all location clusters or different for eachlocation cluster.

Each of significant locations 304, 306, and 308 can be associated withone or more entry timestamps and one or more exit timestamps. Each entrytimestamp can correspond to a time associated with a first location in alocation cluster. For example, a first entry timestamp associated withsignificant location 304 can be a timestamp associated with location202, which is the first location of location cluster 218. A second entrytimestamp associated with significant location 304 can be a timestampassociated with a first location in location cluster 303. Likewise, eachexit timestamp can correspond to a time associated with a last locationin a location cluster. For example, a first exit timestamp associatedwith significant location 304 can be a timestamp associated withlocation 206, which is the last location of location cluster 218. Asecond entry timestamp associated with significant location 304 can be atimestamp associated with a last location in location cluster 303.

Each of significant locations 304, 306, and 308 can be associated with alabel. The label can be designated by a user (e.g., “Home,” “Gym,” or“Work”), or automatically determined by mobile device 102 throughreverse geocoding. In some implementations, the label can be derivedfrom a semantic analysis of a pattern of the time of day and day of weekof each location cluster associated with the significant locations. Thesemantic analysis can be based on behaviors natural to human beings.Mobile device 102 can be programmed to apply pre-determined patternsthat reflect the human behavior. The behavior can include, for example,every human being needs to sleep for some time. The time for sleepingcan be a time mobile device 102 is strictly stationary. A user sleepseight hours a day and eating dinner at home is likely to spend X hours(e.g., 10-12 hours) at home on weekdays, and Y hours on weekends. A usercan be at work Monday through Friday for regular hours. Mobile device102 can leverage these patterns to determine that a significant locationas “home” where (1) mobile device 102 spends more than a first thresholdnumber of hours (e.g., 60 hours) per week; (2) mobile device 102 recordsmost entries and exits; and (3) those entries and exists indicate thatmobile device stays at least a second threshold number of hours (e.g.,eight hours) per day.

For example, mobile device 102 can determine that each location clusterassociated with significant location 304 corresponds to a time perioddesignated as evening during weekdays (e.g., from 7:00 pm to 8:00 amnext day). Mobile device 102 can then designate significant location 304as “home” and provide the designation as a label for significantlocation 304.

Mobile device 102 can determine transitions from one significantlocation to another. For example, mobile device 102 can determine that,on a given weekday, mobile device 102 transitions (312) from significantlocation 304 (“Home”) to significant location 308 (“Work”) between timeT2 and time T3. Mobile device 102 can associate the transition with atransition begin timestamp (e.g., T2) and a transition end timestamp(e.g., T3). Mobile device 102 can construct state model 104 based onsignificant locations 304, 306, and 308 and transitions 312, 314, and316. Details of state model 104 are described below in reference to FIG.4.

FIG. 4 is a diagram illustrating exemplary state model 104 determinedbased on the location clusters. State model 104 can be an n-th orderautoregressive process (e.g., first order autoregressive process)depicting states and state transitions where a transition into a state qis conditioned by a previous state r. Accordingly, state model 104 cancapture an entire history of states and transitions before a givenstate. The state and state transitions can be an abstraction of movementof mobile device 102 among significant locations. Compared to aconventional Gauss-Markov model, state model 104 can be a sufficientmodel, retaining stochastic properties of the state transitions usingdistribution function in time and duration.

State model 104 can include states 106, 402, and 404. States 106, 402,and 404 can correspond to significant locations 304, 308, and 306,respectively. Mobile device 102 can determine significant locations 304,308, and 306 based on location clusters 218, 220, 302, and 303, asdescribed above in reference to FIG. 3. Each of states 106, 402, and 404can be a representation of significant locations 304, 308, and 306,respectively.

State model 104 can include multiple transitions from each state to eachother state. The transitions can include, for example, transition 406from state 106 to state 402, and transition 408 from state 106 to state402. In state model 104, each transition from state 106 to state 402 cancorrespond to a transition from a location cluster of significantlocation 304 to a location cluster of significant location 308. Forexample, transition 406 can represent transition 312 from locationcluster 218 of significant location 304 to location cluster 220 ofsignificant location 308. Transition 408 can represent a transition fromlocation cluster 303 of significant location 304 to a next locationcluster of significant location 308.

Each of transitions 406 and 408 can be associated with a transitionbegin timestamp and a transition end timestamp. Each transition begintimestamp can be a time that mobile device 102 leaves significantlocation 304 represented by state 106. For example, the transition begintimestamp of transition 406 can be Tuesday, 7:00 am; the transitionbegin timestamp of transition 408 can be Wednesday, 7:00 am. Eachtransition end timestamp can be a time that mobile device 102 enterssignificant location 308 represented by state 402. For example, thetransition end timestamp of transition 406 can be Tuesday, 9:00 am; thetransition end timestamp of transition 408 can be Wednesday, 9:00 am.

Each state of state model 104 can be associated with one or more stateentry timestamps and one or more state exit timestamps. For example, afirst state entry timestamp for state 106 can be a time associated witha first location (location 202) of mobile device 102 located in locationcluster 218 of significant location 304. A first state exit timestampcan be a time associated with a last location (location 206) of mobiledevice 102 located in location cluster 218 of significant location 304.The first state entry timestamp and the first state exit timestamp candefine first dwell time 412 of mobile device 102 staying at state 106. Asecond state entry timestamp for state 106 can be a time associated witha first location of mobile device 102 located in location cluster 303 ofsignificant location 304. A second state exit timestamp can be a timeassociated with a last location of mobile device 102 in location cluster303 of significant location 304. The second state entry timestamp andthe second state exit timestamp can define second dwell time 414 ofmobile device 102 staying at state 106.

FIG. 5 is a diagram illustrating incremental changes to state model 104.State model 104 can have a variable topology, allowing incrementaladdition of new states and deletion of obsolete states.

Mobile device 102 can determine new state 502. For example, mobiledevice 102 can determine that a series of location readings indicatethat mobile device 102 is located at a place for a sufficiently longduration that, with sufficient certainty, that the place is asignificant location. Mobile device 102 can determine that thesignificant location is not represented in state model 104. In response,mobile device 102 can create new state 502, and add (504) new state 502to state model 104. Mobile device 102 can add transitions to state 502based on a last significant location visited by mobile device 102 priorto visiting state 502. Mobile device 102 can associate state 502 with astate entry timestamp of a first location reading indicating mobiledevice 102 is located at the significant location of state 502. Mobiledevice 102 can associate state 502 with a state exit timestamp of a lastlocation reading indicating mobile device 102 is at the significantlocation represented by state 502 before mobile device 102 entersanother significant location. Mobile device 102 can add transitions fromstate 502 based on the next significant location visited by mobiledevice 102 and represented in state model 104.

In addition to adding states, mobile device 102 can periodically removestates from state model 104. Mobile device 102 can determine that, for asufficiently long time (e.g., exceeding an X day or week threshold),mobile device 102 has not visited a significant location represented bystate 404. Accordingly, mobile device 102 can remove (506) state 404from state model 104. Removing state 404 can include removingtransitions into state 404 and transitions from state 404.

Mobile device 102 can use state model 104 to predict a future locationof mobile device 102. Predicting the future location can be based atleast in part on a current location of mobile device 102. The currentlocation can be “in state,” where the current location is represented bya state of state model 104. Upon determining that the current locationis in state, mobile device 102 can predict the future location based ontransition probability densities between states. The current locationcan be “out of state,” where the current location is not represented bya state of state model 104. Upon determining that the current locationis out of state, mobile device 102 can predict the future location basedon entry probability densities of entering a state of state model 104from the current location. Details on determining the transitionprobability densities and entry probability densities are describedbelow in reference to FIGS. 6A and 6B.

FIG. 6A is a diagram illustrating determining a transition probabilitydensity 602 between exemplary states 106 and 402. Transition probabilitydensity 602 can indicate a probability distribution of mobile device 102transitions from state 106 to state 402 of state model 104. Mobiledevice 102 can determine transition probability density 602 uponreceiving a request to predict a future location of mobile device 102.The request can be associated with a current time and a future time. Atthe current time, mobile device 102 can be located at a significantlocation corresponding to state 106. The future time can be a point intime or a time window.

Transition probability density 602 can be a distribution over a timeperiod, e.g., [Ta, Tb], where Ta is a starting time, and Tb is an endingtime of the time period. The time period [Ta, Tb] can be a window offorecast. In some implementations, the starting time Ta can correspondto the current time, or the current time with a bias (e.g., X minutesbefore or after the current time); the ending time Tb can correspond tothe future time, or the future time with a bias (e.g., Y minutes beforeor after the future time). In some implementations, the starting time Taand ending time Tb can correspond to a beginning and an ending of a timewindow (e.g., a day or a week), respectively.

Mobile device 100 can determine transition probability density 602 basedon past transitions of mobile device 100 from state 106 to state 402. Ata given time between Ta and Tb, (1) more transitions from state 106 tostate 402 in the past at the given time can correspond to a higherprobability density value; (2) more certainty on the transitions in thepast at the given time can correspond to a higher probability densityvalue; and (3) a more stable pattern of transitions in the past at thegiven time can correspond to a higher probability density value.

For example, t0 corresponds to 8:00 am, and t1 corresponds to 3:00 pm.In the past, and as recorded in state model 104, X number of transitionsoccurred between state 106 and state 402 between 7:00 am and 9:00 am;and Y number of transitions occurred between 2:00 pm and 4:00 pm. If Xis greater than Y, t0 can correspond to comparatively higher probabilitydensity value 604, whereas a can correspond to comparatively lowerprobability density value 606.

In addition, the certainty of the transitions can be relevant. If a meantime of the transition start timestamps of the X transitions is closerto t0 than a mean time of the transition start timestamps of the Ytransition is closer to t1, t0 can correspond to comparatively higherprobability density value 604, whereas a can correspond to comparativelylower probability density value 606. If a variance of the transitionstart timestamps of the X transitions is smaller than a variance of thetransition start timestamps of the Y transitions, t0 can correspond tocomparatively higher probability density value 604, whereas t1 cancorrespond to comparatively lower probability density value 606.

In addition, stability of patterns of transitions in the past can berelevant. Mobile device 102 can determine a pattern of movement based ontime. For example, mobile device 102 can determine, based on transitionsin state model 104, that movement of mobile device 102 follows a weeklypattern. On week days, mobile device 102 transitions from state 106 tostate 402 between 7:00 am and 9:00 am. On weekends, mobile device 102transitions from state 106 to state 402 between 2:00 pm and 4:00 pm.Based on this identified weekly pattern, mobile device 102 can associatea comparatively higher probability density value 604 for time t0 if t0is in a weekday, or associate a comparatively lower probability densityvalue for time t0 if t0 is in a weekend day.

Transition probability density 602 can be discrete or continuous. Upondetermining transition probability density 602 and other transitionprobability densities between states of state model 104, mobile device102 can determine a time-based likelihood of mobile device 102transitioning from a current state (e.g., state 106) to each other statedirectly or indirectly (e.g., through one or more intermediate states).Mobile device 102 can determine a predicted future location of mobiledevice 102 based on the current location, the future time, and theprobabilities of mobile device 102 transitioning to each state.

FIG. 6B is diagram illustrating determining entry probability density620 of exemplary state 106. Entry probability density 620 can indicate aprobability distribution that mobile device 102 enters state 106 from acurrent location that is not represented in state model 104. Mobiledevice 102 can determine entry probability density 620 upon receiving arequest to predict a future location of mobile device 102. The requestcan be associated with a current time and a future time. At the currenttime, mobile device 102 can be located at the un-represented currentlocation. The future time can be a point in time or a time window.

Entry probability density 620 can be a distribution over a time period,e.g., [Tc, Td], where Tc is a starting time, and Td is an ending time ofthe time period. The time period [Tc, Td] can be a window of forecast.In some implementations, the starting time Tc can correspond to thecurrent time, or the current time with a bias (e.g., X minutes before orafter the current time); the ending time Td can correspond to the futuretime, or the future time with a bias (e.g., Y minutes before or afterthe future time). In some implementations, the starting time Tc andending time Td can correspond to a beginning and ending of a time window(e.g., a day or a week), respectively.

Mobile device 102 can determine entry probability density 620 based ondwell time of mobile device 102 in state 106. The dwell time, e.g.,dwell time 412, 414, and 622, can be determined as described above inreference to FIG. 4.

At a given time between Tc and Td, (1) more number of stays of mobiledevice 102 in state 106 in the past at the given time can correspond toa higher probability density value; (2) more certainty on the entry intothe state 106 in the past can correspond to a higher probability densityvalue; and (3) a more stable pattern of entry into state 106 in the pastcan correspond to a higher probability density value.

For example, t2 corresponds to 10:00 am, and t2 corresponds to 3:00 pm.In the past, and as recorded in state model 104 by dwell time 412, 414,and 622, on X number occasions, mobile device 102 is located in state106 at time t2; and on Y number occasions, mobile device 102 is in state106 at time t3. If X is less than Y (e.g., in this example, X=2, Y=3),t2 can correspond to comparatively lower probability density value 624,whereas t3 can correspond to comparatively lower probability densityvalue 626.

Additionally or alternatively, mobile device 102 can determine, based onstate dwelling time determined from state model 104, that location ofmobile device 102 follows a weekly pattern. For example, mobile device102 can determine that dwell time 414, and a number of other dwell timesoccur only on weekdays, whereas dwell times 412 and 622 occur only onweekends. Based on this identified weekly pattern, mobile device 102 canassociate lower probability density value 624 to time t2 and higherprobability density value 624 to time t3 if time t2 and time t3 fall ona weekday. Mobile device 102 can associate equal probability densityvalues to time t2 and time t3 fall on a weekend day.

Entry probability density 620 can be discrete or continuous. Upondetermining entry probability density 620 and other entry probabilitydensities between states of state model 104, mobile device can determinea time-based likelihood of mobile device 102 enters from a currentlocation to each other state directly or indirectly (e.g., through oneor more intermediate states). Mobile device 102 can determine apredicated future location of mobile device 102 based on the currentlocation, the future time, and the probabilities of mobile device 102entering each state.

Mobile device 102 can filter out states from state model 104 before,during, or after calculating the entry probability densities based onvarious factors. Filtering out a state can include preventing the statebeing used for a particular location prediction without removing thestate from state model 104. The factors for filtering out a state caninclude a distance between the current location and the locationrepresented by the state in state model 104. Mobile device 102 canfilter out a state upon determining that, during the forecast timewindow, mobile device 102 is unlikely to reach from the current locationto the location of that state. Mobile device can perform the filteringbased on a time difference between the current time and the startingtime or the ending time of the time window, and a pre-specified maximumspeed of movement of mobile device 102.

For example, mobile device 102 can determine that the time differencebetween the current time and the closing time Td of the forecasting timewindow is X hours. Mobile device can determine that a distance betweenthe current location and the significant location represented by state106 is Y kilometers. Based on a pre-specified maximum speed of Zkilometers per hour, mobile device 102 can filter out state 106 upondetermining that X*Z<Y, indicating that mobile device 102 cannot reachthe location represented by state 106 in X hours, even if travelling atmaximum speed.

Exemplary Device Components

FIG. 7A is a block diagram illustrating components of exemplary mobiledevice 102 implementing predictive user assistance. Each component ofmobile device 102 can include hardware and software components.

Mobile device 102 can include state model determination subsystem 702.State model determination subsystem 702 can be a component of mobiledevice 102 programmed to determining a state model (e.g., state model104) using location data from location determination subsystem 704. Thelocation data can include a series of one or more location readings,each being associated with a timestamp. The location readings caninclude latitude, longitude, and optionally, altitude coordinates.

Location determination subsystem 704 is a component of mobile device 102programmed to determine a location of mobile device 102 using asatellite navigation system (e.g., GPS), a cellular communicationssystem (e.g., by triangulation using cellular towers), or wirelessaccess gateways (e.g., by triangulation using known access pointlocations).

Mobile device 102 can include one or more services 706. Services 706 caninclude functions of an operating system of mobile device 102 or one ormore application programs. Services 706 can request location data fromlocation determination subsystem 704. The request can activate locationdetermination subsystem 704.

State model determination subsystem 702 can be configured to readlocation data provided by location determination subsystem 704 uponactivation of location determination subsystem 704 by services 706.Triggering reading location data by activation of location determinationsubsystem 704 can avoid or minimize consumption of battery power byoperations of determining the state model. Based on the location data,state model determination subsystem 702 can determine a state model andstore the state model in state model database 708. State model database708 can include a storage device on mobile device 102 or on a serverlocated remotely from mobile device 102.

Mobile device 102 can include forecasting subsystem 710. Forecastingsubsystem 710 is a component of mobile device 102 configured todetermine a predicted future location of mobile device 102 based on thestate model stored in state model database 708. One or more services 712or other devices 714 can request a forecast from forecasting subsystem710. The request can be associated with a future time point or timewindow. In response, forecasting subsystem 710 can provide one or morepredicted future locations corresponding to the future time or timewindow.

FIG. 7B is a block diagram illustrating components of exemplary statemodel determination subsystem 702 of FIG. 7A. Each component of statemodel determination subsystem 702 can include hardware and softwarecomponents.

State model determination subsystem 702 can include location listener720. Location listener 720 is a component of state model determinationsubsystem 702 configured to read location data from locationdetermination subsystem 704 upon being triggered by an activation oflocation determination subsystem 704. In some implementations, locationlistener 720 can be programmed to activate location determinationsubsystem 704 periodically to obtain the location data.

Location listener 720 can store the location data received from locationdetermination subsystem 704 to raw location data store 722. Raw locationdata store 722 can be a storage device of mobile device 102 programmedto store raw location data as read from location determination subsystem704. Raw location data store 722 can enforce a persistency policy wherethe raw location data are purged after a specified persistency periodbased on user request or privacy policy.

State model determination subsystem 702 can include abstraction engine724. Abstraction engine 724 is a component of state model determinationsubsystem 702 configured to access the location data stored in rawlocation data store 722. Based on the location data, abstraction engine724 can determine location clusters based on one or more pre-specifiedconditions. The conditions can include a minimum number of locations forestablishing a significant location (e.g., two), a threshold time window(e.g., minimum of X minutes), and outlier criteria. Abstraction engine724 can determine the significant locations by generating abstractionsof the location clusters. Abstraction engine 724 can store thesignificant locations in location data store 726.

Location data store 726 is a storage device of state model determinationsubsystem 702 configured to store significant locations determined byabstraction engine 724. Location data store 726 can enforce apersistency policy where the significant locations are purged after aspecified persistency period. The persistence policy for location datastore 726 can be different from the persistence policy for raw locationdata store 722.

State model determination subsystem 702 can include state modelconstruction engine 728. State model construction engine 728 is acomponent of state model determination subsystem 702 configured to readthe significant locations from location data store 726, and generatestate model 104. In addition, state model construction engine 728 can beconfigured to maintain state model 104 by adding and removing states tostate model 104.

FIG. 7C is a block diagram illustrating components of exemplaryforecasting subsystem 710 of FIG. 7A. Each component of forecastingsubsystem 710 can include hardware and software components.

Forecasting subsystem 710 can include probability modeler 740.Probability modeler 740 is a component of forecasting subsystem 710configured to determine probability densities (e.g., transitionprobability density 602 and entry probability density 620) based onstates and transitions of a state model (e.g., state model 104).Probability modeler 740 can determine the probability densities fortransitions and entries over a time window.

Forecasting subsystem 710 can include pattern analyzer 742. Patternanalyzer 742 is a component of forecasting subsystem 710 configured todetermine a pattern of movement of mobile device 102 over a time period.The time period can be a day, a week, a month, or a year. Patternanalyzer 742 can determine whether to determine a pattern based on aday, a week, a month, or a year based on a longevity of state model 104.For example, pattern analyzer 742 can determine whether state model 104has satisfied a longevity threshold (e.g., contains at least X weeks ofdata).

Upon determining that state model 104 satisfies the threshold, patternanalyzer 742 can determine a weekly pattern. The weekly pattern caninclude a probability distribution calculated for each day of week,where, for example, a probability distribution for Monday is determinedseparately from a probability distribution for Sunday. Upon determiningthat state model 104 does not satisfy the threshold, pattern analyzer742 can determine a daily pattern. The daily pattern can include aprobability distribution calculated for each hour of day, where, forexample, a probability distribution for 9:00 am to 10:00 am isdetermined separately from a probability distribution for 5:00 pm to6:00 pm.

In some implementations, pattern analyzer 742 can determine a dailypattern upon determining that mobile device 102 has moved to a newplace. For example, pattern analyzer 742 can determine that, thedistances between each of the last X number of new states and each stateolder than the last X number of new states exceed a local threshold(e.g., Y kilometers), indicating that mobile device 102 has recentlytravelled to a new location (e.g., to a vacation place). Upon thedetermination, pattern analyzer 742 can determine the daily pattern,starting from the last X number of states.

Forecasting subsystem 710 can include prediction engine 744. Predictionengine 744 is a component of forecasting subsystem 710 configured toreceive a current time and a current location and determine a forecastlocation. Prediction engine 744 can determine a predicted location ofmobile device 102 based on the probability densities for transitions andentries provided by probability modeler 740 and the movement patternsprovided from pattern analyzer 742. Prediction engine 744 can identifymultiple candidate future locations based on the probability densitiesand the movement patterns. Prediction engine 744 can then rank thecandidate future locations using various attributes.

The attributes used by prediction engine 744 to rank the candidatefuture locations can include a last visit to a candidate future locationas represented by a state, where a more recent visit can be associatedwith a higher ranking. The attributes can include a data longevity ofthe state associated with the candidate location, where a state having alonger data history can be associated with a higher ranking. Theattribute can include a likelihood associated with a forecast timewindow, which is determined based on a current location, a future timeof the forecast time window, and a length of the forecast time window.The attributes can include an aggregated dwell time, where a statehaving longer aggregated dwell time can be ranked higher. The attributescan include a number of visits to the state of the candidate location,where more visits or a higher frequency of visits to the state can beranked higher. Prediction engine 744 can provide one or more candidatefuture locations, including the highest ranked candidate futurelocation, to prediction engine interface 746 as a forecast.

Prediction engine interface 746 can be a component of mobile device 102configured to implement an application programming interface (API) toprediction engine 744 such that an application program, function, ordevice complying with the API can access the forecast determined byprediction engine 744. In some implementations, prediction engineinterface 746 can include an interface to other devices 714, e.g.,external display screens or GPS devices, and provide the forecastlocation to other devices 714.

Forecasting subsystem 710 can include semantic analyzer 748. Semanticanalyzer 748 is a component of forecasting subsystem 710 configured todetermine a meaning of each significant location based on pattern ofvisit to the significant location. Semantic analyzer 748 can generatelabels (e.g., “work” or “home”) based on the meaning and provide thelabels to prediction engine interface 746 to be associated with theforecast.

Exemplary Procedures

FIG. 8 is a flowchart illustrating exemplary procedure 800 of generatinga state model 104. Procedure 800 can be performed by mobile device 102.

Mobile device 102 can receive (802), from location determinationsubsystem 704 of mobile device 102, multiple locations of mobile device102. Each location can be associated with a timestamp indicating a timethe location was determined by location determination subsystem 704. Thelocations can be ordered sequentially based on timestamps of thelocations. Receiving the locations can include reading the location fromlocation determination subsystem 704 one at a time. Each reading oflocation determination subsystem 704 can be triggered by an activationof location determination subsystem 704 by an application program orfunction external to a location forecasting application program orfunction.

Mobile device 102 can determine (804), based on a clustering condition,that two or more consecutive locations in the ordered locations form alocation cluster. The location cluster can indicate that mobile device102 has stayed at a geographic location that is sufficiently significantto be represented in a state model for forecasting a movement of mobiledevice 102. The clustering condition can specify that, to be designatedas a location cluster, the consecutive locations are identical, or adistance between each pair of the consecutive locations is less than aspatial proximity threshold. In addition, the clustering condition canspecify that, to be designated as a location cluster, a time differencebetween a timestamp associated with a first location among theconsecutive locations and a timestamp associated with a last locationamong the consecutive locations is greater than a temporal proximitythreshold (e.g., X minutes). The geographic location can be designatedas a significant location, which is a location where mobile device 102has stayed for a time period at least as long as indicated by thetemporal proximity threshold.

In some implementations, determining the location cluster can includevalidating each of the two or more consecutive locations based on anuncertainty value associated with each respective location. Theuncertainty value can indicate a likelihood that the respective locationis determined correctly by location determination subsystem 704. Mobiledevice 102 can exclude one or more outliers from the consecutivelocations. Each outlier can be a location associated with an uncertaintyvalue that exceeds a threshold. Mobile device 102 can then determine thelocation cluster using the validated locations that are not outliers.

In some implementations, a significant location can correspond tomultiple location clusters (e.g., a first location cluster on Monday anda second location cluster on Tuesday). Each location cluster may includelocations that are different from one another. Mobile device 102 candetermine the significant location based on one or more locationclusters corresponding to the significant location by applying arecursive filter having a constant gain to locations in each locationcluster.

Mobile device 102 can determine (806), based on the location cluster,the state model (e.g., state model 104). Mobile device 102 can designatethe significant location as a state in the state model. Mobile device102 can represent each movement of mobile device 102 from a firstsignificant location to a second significant location as a transitionfrom a first state representing the first significant location to asecond state representing the second significant location. Thetransition can be associated with a transition start time and atransition end time. Each state can be associated with one or more stateentry timestamps and one or more state exit timestamps.

Determining the state model can include adding a state or adjusting astate. Upon determining that a location cluster is not alreadydesignated as a state in the state model, mobile device 102 can add thelocation cluster to the state model as a new state. Upon determiningthat the location cluster is already represented as a state in the statemodel, mobile device 102 can adjust the state, including adding atransition to or from the state, or adding a new state entry time andstate exit time to the state.

Mobile device 102 can provide (808) the state model to forecastingsubsystem 710 of mobile device 102 for generating a forecast. Theforecast can include a prediction that a future location of mobiledevice 102, at a given future time, is one of the significant locationsrepresented in the state model. Forecasting subsystem 710 can generatethe forecast based on a current time, the future time, a currentlocation, and a probability density determined based on the states andtransitions of the state model.

In some implementations, mobile device 102 can determine (810) asemantic meaning of each state of the state model. Mobile device 102 candetermine that at least one attribute of the state model satisfies astatistical threshold, and then determine a semantic meaning of thestate and a semantic meaning of the transition. The statisticalthreshold can include a longevity of the state. Determining the semanticmeaning of the state comprises determining whether the state relates toan activity pattern of life (e.g., a pattern of a person going to workor going home). Determining the semantic meaning of the transition canbe based an attribute of a commute between two activities of life.

For example, mobile device 102 can determine that during weekdaymornings, mobile device 102 usually travels from significant location Ato significant location B; that during weekday evenings, mobile device102 usually travels from significant location B to significant locationA; and that during weekends, mobile device 102 is sometimes located atlocation A, but never located at location B. Upon the determination,mobile device 102 can designate location A as “home” and location B as“work” and provide the designations as labels of predicted locations toan application program requesting a forecast.

In some implementations, mobile device 102 can adjust states in thestate model over time using an autoregressive filter. Adjusting thestates includes removing a stale state from the state model upondetermining that the mobile device has not visited a significantlocation represented by the stale model for a given period of time.

FIG. 9 is a flowchart illustrating exemplary procedure 900 of predictinga future location. Procedure 900 can be performed by mobile device 102,for example, using forecasting subsystem 710 of mobile device 102.

Mobile device 102 can receive (902), from a storage device (e.g., statemodel database 708) coupled to mobile device 102, a state model. Thestate model can include multiple states and transitions between thestates. Each state can correspond to a location. Each transition from afirst state to a second state can indicate that, in the past, mobiledevice 102 moved from a corresponding first location to a correspondingsecond location. Each location and transition can be associated with oneor more timestamps.

Mobile device 102 can receive (904), from an application program or adevice, a request for predicting a future location of mobile device 102.The request can specify a future time and, optionally, a currentlocation of mobile device 102. The future time can include a point intime in the future or a time window in the future.

Mobile device 102 can determine (906), using a current time, the futuretime, and a current location of the mobile device as inputs, aprobability for associating with each state in the state model. If therequest does not include the current location, mobile device 102 candetermine the current location using location determination subsystem704. Mobile device 102 can determine the probabilities based on thestates, transitions, and associating timestamps. The probabilities canindicate a likelihood that mobile device 102 will be located at eachrespective location corresponding to a state at the future time.

Determining (906) the probability for associating with each state caninclude determining that the current location is in state, where thecurrent location is represented as a state in the state model.Determining the probability for each state can include determining atransition probability density of mobile device 102 moving from thestate representing current location to a location corresponding to thestate in one or more transitions. The transition probability density cansatisfy properties of a Markov process. Determining the transitionprobability density can be based on the transitions between states and atransition begin timestamp and a transition end timestamp associatedwith each of the transitions.

Determining (906) the probability for associating with each state caninclude determining that the current location is out of state, where thecurrent location is not represented as a state in the state model.Determining the probability to be associated with each state can includedetermining an entry probability density of mobile device 102 entering alocation corresponding to each state from the out-of-state currentlocation. Determining the entry probability density can be based on adwell time mobile device 102 is in each state. Mobile device 102 candetermine the dwell time based on one or more entry timestamps and oneor more exit timestamps associated with the respective state.

In some implementations, determining (906) the probability forassociating with each state can be based on a daily, weekly, monthly, orannual pattern. Mobile device 102 can determine whether the state modelsatisfies a longevity threshold (e.g., X weeks). Mobile device 102 candetermine a first activity pattern upon determining the state modelsatisfies the longevity threshold. The first activity pattern cancorrespond to a first time span (e.g., a week). Alternatively, mobiledevice 102 can determine a second activity pattern upon determining thatthe state model does not satisfy the longevity threshold. The secondactivity pattern can correspond to a second time span (e.g., a day). Thefirst time span can be longer than the second time span. Mobile device102 can determine the probability based on the current time, the futuretime, and the first activity pattern or second activity pattern. Mobiledevice 102 can then determine the probability for associating with eachstate based on the current time, the future time, and the first activitypattern or second activity pattern.

In some implementations, mobile device 102 can filter the states in thestate model based on a distance between the current location and eachlocation represented in the state model and a difference between thecurrent time and the future time. Mobile device 102 can filter out thestates that, given the difference in time, and given a moving speed ofmobile device 102, a likelihood that mobile device 102 reaches the statefrom the current location falls below a threshold value.

Based on the probabilities, mobile device 102 can provide (908) at leastone location associated with a state as a predicted future location ofmobile device 102 in response to the request. In some implementations,providing the location as the predicted future location can includeidentifying a state associated with a highest probability, anddesignating the location associated with the state associated with thehighest probability as the predicted future location. In someimplementations, providing the location as the predicted future locationcan include ranking the states based on the probabilities and one ormore forecast attributes, and designating the location associated with ahighest rank as the predicted future location.

The forecast attributes can include a time of last visit to eachcorresponding location. The forecast attributes can include a derivedlikelihood for a forecast window based on the current location, thecurrent time, and a forecast window length. The forecast attributes caninclude a temporal length of the state model. The forecast attributescan include an aggregated dwell time at each state. The forecastattributes can include a number of visits at each state.

In some implementations, mobile device 102 can determine that a datadensity of the state model satisfies a sparse model threshold. Inresponse, mobile device 102 can determine the probability forassociating with each state in a sparse operating mode. In the sparseoperating mode, probability density calculations and rankings can beperformed in a less stringent matter than the calculations and rankingsin normal operating mode.

Exemplary Mobile Device Architecture

FIG. 10 is a block diagram illustrating exemplary device architecture1000 of a mobile device implementing the features and operations ofcategory-based geofence. A mobile device (e.g., mobile device 102) caninclude memory interface 1002, one or more data processors, imageprocessors and/or processors 1004, and peripherals interface 1006.Memory interface 1002, one or more processors 1004 and/or peripheralsinterface 1006 can be separate components or can be integrated in one ormore integrated circuits. Processors 1004 can include applicationprocessors, baseband processors, and wireless processors. The variouscomponents in mobile device 102, for example, can be coupled by one ormore communication buses or signal lines.

Sensors, devices, and subsystems can be coupled to peripherals interface1006 to facilitate multiple functionalities. For example, motion sensor1010, light sensor 1012, and proximity sensor 1014 can be coupled toperipherals interface 1006 to facilitate orientation, lighting, andproximity functions of the mobile device. Location processor 1015 (e.g.,GPS receiver) can be connected to peripherals interface 1006 to providegeopositioning. Electronic magnetometer 1016 (e.g., an integratedcircuit chip) can also be connected to peripherals interface 1006 toprovide data that can be used to determine the direction of magneticNorth. Thus, electronic magnetometer 1016 can be used as an electroniccompass. Motion sensor 1010 can include one or more accelerometersconfigured to determine change of speed and direction of movement of themobile device. Barometer 1017 can include one or more devices connectedto peripherals interface 1006 and configured to measure pressure ofatmosphere around the mobile device.

Camera subsystem 1020 and an optical sensor 1022, e.g., a chargedcoupled device (CCD) or a complementary metal-oxide semiconductor (CMOS)optical sensor, can be utilized to facilitate camera functions, such asrecording photographs and video clips.

Communication functions can be facilitated through one or more wirelesscommunication subsystems 1024, which can include radio frequencyreceivers and transmitters and/or optical (e.g., infrared) receivers andtransmitters. The specific design and implementation of thecommunication subsystem 1024 can depend on the communication network(s)over which a mobile device is intended to operate. For example, a mobiledevice can include communication subsystems 1024 designed to operateover a GSM network, a GPRS network, an EDGE network, a Wi-Fi™ or WiMAX™network, and a Bluetooth™ network. In particular, the wirelesscommunication subsystems 1024 can include hosting protocols such thatthe mobile device can be configured as a base station for other wirelessdevices.

Audio subsystem 1026 can be coupled to a speaker 1028 and a microphone1030 to facilitate voice-enabled functions, such as voice recognition,voice replication, digital recording, and telephony functions. Audiosubsystem 1026 can be configured to receive voice commands from theuser.

I/O subsystem 1040 can include touch surface controller 1042 and/orother input controller(s) 1044. Touch surface controller 1042 can becoupled to a touch surface 1046 or pad. Touch surface 1046 and touchsurface controller 1042 can, for example, detect contact and movement orbreak thereof using any of a plurality of touch sensitivitytechnologies, including but not limited to capacitive, resistive,infrared, and surface acoustic wave technologies, as well as otherproximity sensor arrays or other elements for determining one or morepoints of contact with touch surface 1046. Touch surface 1046 caninclude, for example, a touch screen.

Other input controller(s) 1044 can be coupled to other input/controldevices 1048, such as one or more buttons, rocker switches, thumb-wheel,infrared port, USB port, and/or a pointer device such as a stylus. Theone or more buttons (not shown) can include an up/down button for volumecontrol of speaker 1028 and/or microphone 1030.

In one implementation, a pressing of the button for a first duration maydisengage a lock of the touch surface 1046; and a pressing of the buttonfor a second duration that is longer than the first duration may turnpower to mobile device 102 on or off. The user may be able to customizea functionality of one or more of the buttons. The touch surface 1046can, for example, also be used to implement virtual or soft buttonsand/or a keyboard.

In some implementations, mobile device 102 can present recorded audioand/or video files, such as MP3, AAC, and MPEG files. In someimplementations, mobile device 102 can include the functionality of anMP3 player. Mobile device 102 may, therefore, include a pin connectorthat is compatible with the iPod. Other input/output and control devicescan also be used.

Memory interface 1002 can be coupled to memory 1050. Memory 1050 caninclude high-speed random access memory and/or non-volatile memory, suchas one or more magnetic disk storage devices, one or more opticalstorage devices, and/or flash memory (e.g., NAND, NOR). Memory 1050 canstore operating system 1052, such as Darwin, RTXC, LINUX, UNIX, OS X,WINDOWS, iOS, or an embedded operating system such as VxWorks. Operatingsystem 1052 may include instructions for handling basic system servicesand for performing hardware dependent tasks. In some implementations,operating system 1052 can include a kernel (e.g., UNIX kernel).

Memory 1050 may also store communication instructions 1054 to facilitatecommunicating with one or more additional devices, one or more computersand/or one or more servers. Memory 1050 may include graphical userinterface instructions 1056 to facilitate graphic user interfaceprocessing; sensor processing instructions 1058 to facilitatesensor-related processing and functions; phone instructions 1060 tofacilitate phone-related processes and functions; electronic messaginginstructions 1062 to facilitate electronic-messaging related processesand functions; web browsing instructions 1064 to facilitate webbrowsing-related processes and functions; media processing instructions1066 to facilitate media processing-related processes and functions;GPS/Navigation instructions 1068 to facilitate GPS andnavigation-related processes and instructions; camera instructions 1070to facilitate camera-related processes and functions; magnetometer data1072 and calibration instructions 1074 to facilitate magnetometercalibration. The memory 1050 may also store other software instructions(not shown), such as security instructions, web video instructions tofacilitate web video-related processes and functions, and/or webshopping instructions to facilitate web shopping-related processes andfunctions. In some implementations, the media processing instructions1066 are divided into audio processing instructions and video processinginstructions to facilitate audio processing-related processes andfunctions and video processing-related processes and functions,respectively. An activation record and International Mobile EquipmentIdentity (IMEI) or similar hardware identifier can also be stored inmemory 1050. Memory 1050 can store predictive user assistanceinstructions 1076 that include modeling instructions and forecastinginstructions. The modeling instructions, upon execution, can causeprocessor 1004 to perform the operations of state model determinationsubsystem 702, including procedure 800. The forecasting instructions,upon execution, can cause processor 1004 to perform the operations offorecasting subsystem 710. The operations can include procedure 900.

Each of the above identified instructions and applications cancorrespond to a set of instructions for performing one or more functionsdescribed above. These instructions need not be implemented as separatesoftware programs, procedures, or modules. Memory 1050 can includeadditional instructions or fewer instructions. Furthermore, variousfunctions of the mobile device may be implemented in hardware and/or insoftware, including in one or more signal processing and/or applicationspecific integrated circuits.

Exemplary Operating Environment

FIG. 11 is a block diagram of exemplary network operating environment1100 for the mobile devices implementing the features and operations ofcategory-based geofence. Mobile devices 1102 a and 1102 b can, forexample, communicate over one or more wired and/or wireless networks1110 in data communication. For example, a wireless network 1112, e.g.,a cellular network, can communicate with a wide area network (WAN) 1114,such as the Internet, by use of a gateway 1116. Likewise, an accessdevice 1118, such as an 802.11g wireless access point, can providecommunication access to the wide area network 1114. Each of mobiledevices 1102 a and 1102 b can be mobile device 102.

In some implementations, both voice and data communications can beestablished over wireless network 1112 and the access device 1118. Forexample, mobile device 1102 a can place and receive phone calls (e.g.,using voice over Internet Protocol (VoIP) protocols), send and receivee-mail messages (e.g., using Post Office Protocol 3 (POP3)), andretrieve electronic documents and/or streams, such as web pages,photographs, and videos, over wireless network 1112, gateway 1116, andwide area network 1114 (e.g., using Transmission ControlProtocol/Internet Protocol (TCP/IP) or User Datagram Protocol (UDP)).Likewise, in some implementations, the mobile device 1102 b can placeand receive phone calls, send and receive e-mail messages, and retrieveelectronic documents over the access device 1118 and the wide areanetwork 1114. In some implementations, mobile device 1102 a or 1102 bcan be physically connected to the access device 1118 using one or morecables and the access device 1118 can be a personal computer. In thisconfiguration, mobile device 1102 a or 1102 b can be referred to as a“tethered” device.

Mobile devices 1102 a and 1102 b can also establish communications byother means. For example, wireless device 1102 a can communicate withother wireless devices, e.g., other mobile devices, cell phones, etc.,over the wireless network 1112. Likewise, mobile devices 1102 a and 1102b can establish peer-to-peer communications 1120, e.g., a personal areanetwork, by use of one or more communication subsystems, such as theBluetooth™ communication devices. Other communication protocols andtopologies can also be implemented.

Mobile device 1102 a or 1102 b can, for example, communicate with one ormore services 1130 and 1140 over the one or more wired and/or wirelessnetworks. For example, one or more location services 1130 can providelocation data associated with cellular towers or wireless accessgateways to mobile devices 1102 a and 1102 b such that mobile device1102 a and 1102 b can determine a current location using triangulation.Traffic services 1140 can provide traffic information based on a currenttime, current location, and a forecast location to assist a userplanning a route to the forecast location.

Mobile device 1102 a or 1102 b can also access other data and contentover the one or more wired and/or wireless networks. For example,content publishers, such as news sites, Really Simple Syndication (RSS)feeds, web sites, blogs, social networking sites, developer networks,etc., can be accessed by mobile device 1102 a or 1102 b. Such access canbe provided by invocation of a web browsing function or application(e.g., a browser) in response to a user touching, for example, a Webobject.

As described above, some aspects of the subject matter of thisspecification include gathering and use of data available from varioussources to improve services a mobile device can provide to a user. Thepresent disclosure contemplates that in some instances, this gathereddata may include personal information data that uniquely identifies orcan be used to contact or locate a specific person. Such personalinformation data can include demographic data, location-based data,telephone numbers, email addresses, twitter ID's, home addresses, or anyother identifying information.

The present disclosure recognizes that the use of such personalinformation data, in the present technology, can be used to the benefitof users. For example, the personal information data can be used todeliver targeted content that is of greater interest to the user.Accordingly, use of such personal information data enables calculatedcontrol of the delivered content. Further, other uses for personalinformation data that benefit the user are also contemplated by thepresent disclosure.

The present disclosure further contemplates that the entitiesresponsible for the collection, analysis, disclosure, transfer, storage,or other use of such personal information data will comply withwell-established privacy policies and/or privacy practices. Inparticular, such entities should implement and consistently use privacypolicies and practices that are generally recognized as meeting orexceeding industry or governmental requirements for maintaining personalinformation data private and secure. For example, personal informationfrom users should be collected for legitimate and reasonable uses of theentity and not shared or sold outside of those legitimate uses. Further,such collection should occur only after receiving the informed consentof the users. Additionally, such entities would take any needed stepsfor safeguarding and securing access to such personal information dataand ensuring that others with access to the personal information dataadhere to their privacy policies and procedures. Further, such entitiescan subject themselves to evaluation by third parties to certify theiradherence to widely accepted privacy policies and practices.

Despite the foregoing, the present disclosure also contemplatesembodiments in which users selectively block the use of, or access to,personal information data. That is, the present disclosure contemplatesthat hardware and/or software elements can be provided to prevent orblock access to such personal information data. For example, in the caseof advertisement delivery services, the present technology can beconfigured to allow users to select to “opt in” or “opt out” ofparticipation in the collection of personal information data duringregistration for services.

Therefore, although the present disclosure broadly covers use ofpersonal information data to implement one or more various disclosedembodiments, the present disclosure also contemplates that the variousembodiments can also be implemented without the need for accessing suchpersonal information data. That is, the various embodiments of thepresent technology are not rendered inoperable due to the lack of all ora portion of such personal information data. For example, content can beselected and delivered to users by inferring preferences based onnon-personal information data or a bare minimum amount of personalinformation, such as the content being requested by the deviceassociated with a user, other non-personal information available to thecontent delivery services, or publically available information.

A number of implementations of the invention have been described.Nevertheless, it will be understood that various modifications can bemade without departing from the spirit and scope of the invention.

What is claimed is:
 1. A method comprising: receiving, by a mobiledevice and from a location determination subsystem of the mobile device,a plurality of locations of the mobile device, each location beingassociated with a timestamp indicating a time the location wasdetermined by the location determination subsystem, the plurality oflocations being ordered sequentially based on timestamps of thelocations; determining, by the mobile device and based on a clusteringcondition, that two or more consecutive locations in the orderedplurality of locations form a location cluster, the location clusterindicating that the mobile device has stayed at a geographic locationthat is sufficiently significant to be represented in a state model forforecasting a movement of the mobile device; determining, by the mobiledevice and based on the location cluster, the state model, includingdesignating the significant location as a state in the state model andrepresenting each movement of the mobile device from a first significantlocation to a second significant location as a transition from a firststate representing the first significant location to a second staterepresenting the second significant location, the transition beingassociated with a transition start time and a transition end time; andproviding the state model to a forecasting subsystem of the mobiledevice for generating a forecast that a future location of the mobiledevice at a given future time is one of the significant locationsrepresented in the state model, wherein generating the forecast is basedon a current time, the future time, a current location, and aprobability density determined based on the states and transitions ofthe state model.
 2. The method of claim 1, wherein receiving thelocations comprises reading the location from the location determinationsubsystem one at a time, each reading of the location determinationsubsystem being triggered by an activation of the location determinationsubsystem by an application program or function external to a locationforecasting application program or function.
 3. The method of claim 1,wherein the clustering condition specifies that: the consecutivelocations are identical, or a distance between each pair of theconsecutive locations is less than a spatial proximity threshold; and atime difference between a timestamp associated with a first locationamong the consecutive locations and a timestamp associated with a lastlocation among the consecutive locations is greater than a temporalproximity threshold, wherein the significant location is a locationwhere the mobile device has stayed for a time period at least as long asindicated by the temporal proximity threshold.
 4. The method of claim 1,wherein determining the location cluster comprises: validating each ofthe two or more consecutive locations based on an uncertainty valueassociated with each respective location, the uncertainty valueindicating a likelihood that the respective location is determinedcorrectly by the location determination subsystem; excluding one or moreoutliers from the consecutive locations, each outlier being a locationassociated with an uncertainty value that exceeds a threshold; anddetermining the location cluster using the validated locations that arenot outliers.
 5. The method of claim 1, wherein the significant locationis determined based on the location cluster by applying a recursivefilter having a constant gain to locations in the location cluster. 6.The method of claim 1, wherein each state in the state model isassociated with state entry timestamp and a state exit timestamp.
 7. Themethod of claim 1, wherein determining the state model comprises one of:upon determining that the location cluster is already designated as thestate in the state model, adding a transition of the mobile devicebetween the state and another state to the state model or adding a stateentry time and a state exit timestamp to the state; or upon determiningthat the location cluster is not already represented as the state in thestate model, adding the location cluster to the state model.
 8. Themethod of claim 1, comprising: determining that at least one attributeof the state model satisfies a statistical threshold; and thendetermining a semantic meaning of the state and a semantic meaning ofthe transition.
 9. The method of claim 8, wherein: the statisticalthreshold comprises a longevity of each state; determining the semanticmeaning of the state comprises determining whether the state relates toan activity pattern of life; and determining the semantic meaning of thetransition is based an attribute of a commute between two activities oflife.
 10. The method of claim 1, comprising adjusting states in thestate model over time using an autoregressive filter, wherein adjustingthe states includes removing a stale state from the state model upondetermining that the mobile device has not visited a significantlocation represented by the state model for a given period of time. 11.A system comprising: one or more processors; and a non-transitorycomputer-readable medium coupled to the one or more processors andstoring instructions operable to cause the one or more processors toperform operations comprising: receiving a plurality of locations of amobile device, each location being associated with a timestampindicating a time the location was determined by the locationdetermination subsystem, the plurality of locations being orderedsequentially based on timestamps of the locations; determining, based ona clustering condition, that two or more consecutive locations in theordered plurality of locations form a location cluster, the locationcluster indicating that the mobile device has stayed at a geographiclocation that is sufficiently significant to be represented in a statemodel for forecasting a movement of the mobile device; determining,based on the location cluster, the state model, including designatingthe significant location as a state in the state model and representingeach movement of the mobile device from a first significant location toa second significant location as a transition from a first staterepresenting the first significant location to a second staterepresenting the second significant location, the transition beingassociated with a transition start time and a transition end time; andproviding the state model to a forecasting subsystem of the mobiledevice for generating a forecast that a future location of the mobiledevice at a given future time is one of the significant locationsrepresented in the state model.
 12. The system of claim 11, whereinreceiving the locations comprises reading the location from the locationdetermination subsystem one at a time, each reading of the locationdetermination subsystem being triggered by an activation of the locationdetermination subsystem by an application program or function externalto a location forecasting application program or function.
 13. Thesystem of claim 11, wherein the clustering condition specifies that: theconsecutive locations are identical, or a distance between each pair ofthe consecutive locations is less than a spatial proximity threshold;and a time difference between a timestamp associated with a firstlocation among the consecutive locations and a timestamp associated witha last location among the consecutive locations is greater than atemporal proximity threshold, wherein the significant location is alocation where the mobile device has stayed for a time period at leastas long as indicated by the temporal proximity threshold.
 14. The systemof claim 11, wherein determining the location cluster comprises:validating each of the two or more consecutive locations based on anuncertainty value associated with each respective location, theuncertainty value indicating a likelihood that the respective locationis determined correctly by the location determination subsystem;excluding one or more outliers from the consecutive locations, eachoutlier being a location associated with an uncertainty value thatexceeds a threshold; and determining the location cluster using thevalidated locations that are not outliers.
 15. The system of claim 11,wherein the significant location is determined based on the locationcluster by applying a recursive filter having a constant gain tolocations in the location cluster.
 16. The system of claim 11, whereineach state in the state model is associated with state entry timestampand a state exit timestamp.
 17. The system of claim 11, whereindetermining the state model comprises one of: upon determining that thelocation cluster is already designated as the state in the state model,adding a transition of the mobile device between the state and anotherstate to the state model or adding a state entry time and a state exittimestamp to the state; or upon determining that the location cluster isnot already represented as the state in the state model, adding thelocation cluster to the state model.
 18. The system of claim 11, theoperations comprising: determining that at least one attribute of thestate model satisfies a statistical threshold; and then determining asemantic meaning of the state and a semantic meaning of the transition.19. The system of claim 18, wherein: the statistical threshold comprisesa longevity of each state; determining the semantic meaning of the statecomprises determining whether the state relates to an activity patternof life; and determining the semantic meaning of the transition is basedan attribute of a commute between two activities of life.
 20. The systemof claim 11, the operations comprising adjusting states in the statemodel over time using an autoregressive filter, wherein adjusting thestates includes removing a stale state from the state model upondetermining that the mobile device has not visited a significantlocation represented by the state model for a given period of time. 21.A non-transitory computer-readable medium coupled to one or moreprocessors and storing instructions operable to cause the one or moreprocessors to perform operations comprising: receiving a plurality oflocations of the mobile device, each location being associated with atimestamp indicating a time the location was determined by the locationdetermination subsystem, the plurality of locations being orderedsequentially based on timestamps of the locations; determining, based ona clustering condition, that two or more consecutive locations in theordered plurality of locations form a location cluster, the locationcluster indicating that the mobile device has stayed at a geographiclocation that is sufficiently significant to be represented in a statemodel for forecasting a movement of the mobile device; determining,based on the location cluster, the state model, including designatingthe significant location as a state in the state model and representingeach movement of the mobile device from a first significant location toa second significant location as a transition from a first staterepresenting the first significant location to a second staterepresenting the second significant location, the transition beingassociated with a transition start time and a transition end time; andproviding the state model to a forecasting subsystem of the mobiledevice for generating a forecast that a future location of the mobiledevice at a given future time is one of the significant locationsrepresented in the state model.
 22. The non-transitory computer-readablemedium of claim 21, wherein receiving the locations comprises readingthe location from the location determination subsystem one at a time,each reading of the location determination subsystem being triggered byan activation of the location determination subsystem by an applicationprogram or function external to a location forecasting applicationprogram or function.
 23. The non-transitory computer-readable medium ofclaim 21, wherein the clustering condition specifies that: theconsecutive locations are identical, or a distance between each pair ofthe consecutive locations is less than a spatial proximity threshold;and a time difference between a timestamp associated with a firstlocation among the consecutive locations and a timestamp associated witha last location among the consecutive locations is greater than atemporal proximity threshold, wherein the significant location is alocation where the mobile device has stayed for a time period at leastas long as indicated by the temporal proximity threshold.
 24. Thenon-transitory computer-readable medium of claim 21, wherein determiningthe location cluster comprises: validating each of the two or moreconsecutive locations based on an uncertainty value associated with eachrespective location, the uncertainty value indicating a likelihood thatthe respective location is determined correctly by the locationdetermination subsystem; excluding one or more outliers from theconsecutive locations, each outlier being a location associated with anuncertainty value that exceeds a threshold; and determining the locationcluster using the validated locations that are not outliers.
 25. Thenon-transitory computer-readable medium of claim 21, wherein thesignificant location is determined based on the location cluster byapplying a recursive filter having a constant gain to locations in thelocation cluster.
 26. The non-transitory computer-readable medium ofclaim 21, wherein each state in the state model is associated with stateentry timestamp and a state exit timestamp.
 27. The non-transitorycomputer-readable medium of claim 21, wherein determining the statemodel comprises one of: upon determining that the location cluster isalready designated as the state in the state model, adding a transitionof the mobile device between the state and another state to the statemodel or adding a state entry time and a state exit timestamp to thestate; or upon determining that the location cluster is not alreadyrepresented as the state in the state model, adding the location clusterto the state model.
 28. The non-transitory computer-readable medium ofclaim 21, the operations comprising: determining that at least oneattribute of the state model satisfies a statistical threshold; and thendetermining a semantic meaning of the state and a semantic meaning ofthe transition.
 29. The non-transitory computer-readable medium of claim28, wherein: the statistical threshold comprises a longevity of eachstate; determining the semantic meaning of the state comprisesdetermining whether the state relates to an activity pattern of life;and determining the semantic meaning of the transition is based anattribute of a commute between two activities of life.
 30. Thenon-transitory computer-readable medium of claim 21, the operationscomprising adjusting states in the state model over time using anautoregressive filter, wherein adjusting the states includes removing astale state from the state model upon determining that the mobile devicehas not visited a significant location represented by the state modelfor a given period of time.